package ooad.gof.observer.book;
//JDK Observable
import java.util.Observable;
/**
 * 图书——被观察者
 *
 */
public class Book extends Observable{
	private String name;
	private double price;	
	public Book(String name, double price){
		this.name = name;
		this.price = price;
	}
	public String getName() {
		return name;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
        super.setChanged();
		super.notifyObservers(this);
	}
}
